package org.game.module;
 
import org.game.module.core.Core;
import com.sojoys.artifact.exception.AbstractLogicModelException;
import com.sojoys.artifact.factory.message.IMessage;
import com.xiaoleilu.hutool.date.DateUtil;
import com.sojoys.artifact.factory.bytebuff.IByteBuff;
import org.game.module.chatbo.ChatBO;
import org.game.module.datingbo.DatingBO;
import com.sojoys.artifact.manager.MessageManager;
import org.game.module.itembo.ItemBO;
import java.util.HashMap;
import com.sojoys.artifact.factory.session.ISession;
import com.sojoys.artifact.tools.ToolMap;
import java.util.Map;
import org.game.module.mailbo.MailBO;
import org.game.module.dungeonbo.DungeonBO;
import org.game.module.elementcollectbo.ElementCollectBO;
import org.game.module.summonbo.SummonBO;
import com.xiaoleilu.hutool.log.Log;
import com.sojoys.artifact.manager.ByteBuffManager;
import org.game.module.herobo.HeroBO;
import com.sojoys.artifact.core.IServer;
import com.xiaoleilu.hutool.date.TimeInterval;
import org.game.module.taskbo.TaskBO;
import com.sojoys.artifact.constant.ArtifactErrorCode;
import org.game.module.friendsbo.FriendsBO;
import org.game.module.storebo.StoreBO;
import com.sojoys.artifact.tools.ToolError;
import org.game.module.equipmentbo.EquipmentBO;
import com.xiaoleilu.hutool.log.LogFactory;
import org.game.module.noticebo.NoticeBO;
import org.game.module.activitybo.ActivityBO;
import org.game.module.rolebo.RoleBO;
import org.game.module.endlesscloisterbo.EndlessCloisterBO;
import org.game.module.buildingbo.BuildingBO;
import org.game.module.rechargebo.RechargeBO;
 
public class Dispatcher {
	static Log log = LogFactory.get(Dispatcher.class);
	private static final Dispatcher ME = new Dispatcher();
      
    
    public static Dispatcher me() {  
        return ME;  
    }

	/** 逻辑分发入口 */
	public IMessage disp(ISession session,IMessage in){
		IMessage out = MessageManager.me().create();
		TimeInterval timer = DateUtil.timer();
		try {
			short commandId = in.getCommandId();
			out.setCommandId(commandId);
			// 日志分割
			log.debug("----------------------------------------------------------------------------");		
			out.setBody(disp(session,commandId, in));
		} catch (AbstractLogicModelException e) {
			out.setStatus(e.getCode());
		} catch (Exception e) {
			log.error(e);
			out.setStatus(ArtifactErrorCode.UNKNOWN_ERROR);
		} finally {
			// 记录执行时间
			log.debug("commandId : {} execute time : {}",in.getCommandId(), timer.interval());
		}
		
		// 此处不返回，等待异步返回
		if(out.getBody() == null)
			return out; 
			
		session.sendMessage(out);
		return out;
	}

	// 逻辑分发
	public byte[] disp(ISession session,short commandId,IMessage in) throws AbstractLogicModelException {
		byte classCode = (byte) (commandId >> 8);
		switch (classCode) {
			case 21: // 无尽回廊
				return endlessCloisterBO(session,classCode, (byte) (commandId ^ classCode << 8),in);
			case 20: // 活动
				return activityBO(session,classCode, (byte) (commandId ^ classCode << 8),in);
			case 19: // 图鉴（元素收集）
				return elementCollectBO(session,classCode, (byte) (commandId ^ classCode << 8),in);
			case 17: // 充值
				return rechargeBO(session,classCode, (byte) (commandId ^ classCode << 8),in);
			case 16: // 任务
				return taskBO(session,classCode, (byte) (commandId ^ classCode << 8),in);
			case 14: // 通知
				return noticeBO(session,classCode, (byte) (commandId ^ classCode << 8),in);
			case 13: // 召唤
				return summonBO(session,classCode, (byte) (commandId ^ classCode << 8),in);
			case 12: // 好友
				return friendsBO(session,classCode, (byte) (commandId ^ classCode << 8),in);
			case 11: // 灵装
				return equipmentBO(session,classCode, (byte) (commandId ^ classCode << 8),in);
			case 10: // 商店
				return storeBO(session,classCode, (byte) (commandId ^ classCode << 8),in);
			case 8: // 建筑
				return buildingBO(session,classCode, (byte) (commandId ^ classCode << 8),in);
			case 9: // 聊天
				return chatBO(session,classCode, (byte) (commandId ^ classCode << 8),in);
			case 7: // 副本
				return dungeonBO(session,classCode, (byte) (commandId ^ classCode << 8),in);
			case 6: // 约会
				return datingBO(session,classCode, (byte) (commandId ^ classCode << 8),in);
			case 5: // 精灵(版娘)
				return roleBO(session,classCode, (byte) (commandId ^ classCode << 8),in);
			case 4: // 英雄
				return heroBO(session,classCode, (byte) (commandId ^ classCode << 8),in);
			case 3: // 邮件
				return mailBO(session,classCode, (byte) (commandId ^ classCode << 8),in);
			case 2: // 道具
				return itemBO(session,classCode, (byte) (commandId ^ classCode << 8),in);
			case 1: // 核心
				return core(session,classCode, (byte) (commandId ^ classCode << 8),in);
			default:
				throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
    }
    
    
    /** -----------------------模块开始----------------------- */
    
    
	// 无尽回廊
	private byte[] endlessCloisterBO(ISession session,byte classCode,byte methodCode,IMessage in) throws AbstractLogicModelException{
		EndlessCloisterBO endlessCloisterBO = IServer.getModules().getModule(classCode,EndlessCloisterBO.class);
		if(endlessCloisterBO == null){
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
		switch (methodCode) {
		case 1: { // 获取无尽回廊信息 [code = 5377]
	    	log.debug("Remark:{}","获取无尽回廊信息 [code = 5377]");
		    org.game.protobuf.c2s.C2SEndlessCloisterMsg.ReqEndlessCloisterInfo msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SEndlessCloisterMsg.ReqEndlessCloisterInfo.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return endlessCloisterBO.getInfo(session, msg);
		}
		case 2: { // 请求开始挑战 [code = 5378]
	    	log.debug("Remark:{}","请求开始挑战 [code = 5378]");
		    org.game.protobuf.c2s.C2SEndlessCloisterMsg.ReqStartFightEndless msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SEndlessCloisterMsg.ReqStartFightEndless.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return endlessCloisterBO.startFight(session, msg);
		}
		case 3: { // 通关指定关卡 [code = 5379]
	    	log.debug("Remark:{}","通关指定关卡 [code = 5379]");
		    org.game.protobuf.c2s.C2SEndlessCloisterMsg.ReqPassStageEndless msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SEndlessCloisterMsg.ReqPassStageEndless.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return endlessCloisterBO.passStage(session, msg);
		}
		default:
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
	}
	// 活动
	private byte[] activityBO(ISession session,byte classCode,byte methodCode,IMessage in) throws AbstractLogicModelException{
		ActivityBO activityBO = IServer.getModules().getModule(classCode,ActivityBO.class);
		if(activityBO == null){
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
		switch (methodCode) {
		case 1: { // 获取所有活动 [code = 5121]
	    	log.debug("Remark:{}","获取所有活动 [code = 5121]");
		    org.game.protobuf.c2s.C2SActivityMsg.ReqActivitys msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SActivityMsg.ReqActivitys.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return activityBO.getAllActivity(session, msg);
		}
		case 2: { // 提交活动 [code = 5122]
	    	log.debug("Remark:{}","提交活动 [code = 5122]");
		    org.game.protobuf.c2s.C2SActivityMsg.SubmitActivity msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SActivityMsg.SubmitActivity.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return activityBO.submit(session, msg);
		}
		case 3:  // 推送活动信息 [code = 5123]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		default:
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
	}
	// 图鉴（元素收集）
	private byte[] elementCollectBO(ISession session,byte classCode,byte methodCode,IMessage in) throws AbstractLogicModelException{
		ElementCollectBO elementCollectBO = IServer.getModules().getModule(classCode,ElementCollectBO.class);
		if(elementCollectBO == null){
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
		switch (methodCode) {
		case 1: { // 获取所有图鉴 [code = 4865]
	    	log.debug("Remark:{}","获取所有图鉴 [code = 4865]");
		    org.game.protobuf.c2s.C2SElementCollectMsg.GetAllElement msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SElementCollectMsg.GetAllElement.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return elementCollectBO.getAllElement(session, msg);
		}
		case 2:  // 新增图鉴 [code = 4866]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		default:
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
	}
	// 充值
	private byte[] rechargeBO(ISession session,byte classCode,byte methodCode,IMessage in) throws AbstractLogicModelException{
		RechargeBO rechargeBO = IServer.getModules().getModule(classCode,RechargeBO.class);
		if(rechargeBO == null){
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
		switch (methodCode) {
		case 1: { // 获取订单号 [code = 4353]
	    	log.debug("Remark:{}","获取订单号 [code = 4353]");
		    org.game.protobuf.c2s.C2SRechargeMsg.GetOrderNo msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SRechargeMsg.GetOrderNo.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return rechargeBO.getOrderNo(session, msg);
		}
		case 3:  // 充值成功 [code = 4355]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		case 4: { // 获取月卡信息 [code = 4356]
	    	log.debug("Remark:{}","获取月卡信息 [code = 4356]");
		    org.game.protobuf.c2s.C2SRechargeMsg.GetMonthCardInfo msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SRechargeMsg.GetMonthCardInfo.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return rechargeBO.getMonthCardInfo(session, msg);
		}
		case 5: { // 获取购买记录 [code = 4357]
	    	log.debug("Remark:{}","获取购买记录 [code = 4357]");
		    org.game.protobuf.c2s.C2SRechargeMsg.GetBuyRecordInfo msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SRechargeMsg.GetBuyRecordInfo.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return rechargeBO.getBuyRecordInfo(session, msg);
		}
		case 6:  // 推送购买记录 [code = 4358]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		case 7:  // 推送购买月卡信息 [code = 4359]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		case 8: { // 获取充值商品列表 [code = 4360]
	    	log.debug("Remark:{}","获取充值商品列表 [code = 4360]");
		    org.game.protobuf.c2s.C2SRechargeMsg.GetRechargeCfg msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SRechargeMsg.GetRechargeCfg.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return rechargeBO.GetRechargeCfgList(session, msg);
		}
		default:
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
	}
	// 任务
	private byte[] taskBO(ISession session,byte classCode,byte methodCode,IMessage in) throws AbstractLogicModelException{
		TaskBO taskBO = IServer.getModules().getModule(classCode,TaskBO.class);
		if(taskBO == null){
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
		switch (methodCode) {
		case 1: { // 取得全部任务 [code = 4097]
	    	log.debug("Remark:{}","取得全部任务 [code = 4097]");
		    org.game.protobuf.c2s.C2STaskMsg.ReqTasks msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2STaskMsg.ReqTasks.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return taskBO.getTasks(session, msg);
		}
		case 2: { // 提交任务(领奖) [code = 4098]
	    	log.debug("Remark:{}","提交任务(领奖) [code = 4098]");
		    org.game.protobuf.c2s.C2STaskMsg.SubmitTask msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2STaskMsg.SubmitTask.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return taskBO.submitTasks(session, msg);
		}
		default:
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
	}
	// 通知
	private byte[] noticeBO(ISession session,byte classCode,byte methodCode,IMessage in) throws AbstractLogicModelException{
		NoticeBO noticeBO = IServer.getModules().getModule(classCode,NoticeBO.class);
		if(noticeBO == null){
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
		switch (methodCode) {
		case 1: { // 获取公告牌通知 [code = 3585]
	    	log.debug("Remark:{}","获取公告牌通知 [code = 3585]");
		    org.game.protobuf.c2s.C2SNoticeMsg.GetBillboardNotice msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SNoticeMsg.GetBillboardNotice.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return noticeBO.getBillboardNotice(session, msg);
		}
		case 2:  // 推送跑马灯 [code = 3586]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		default:
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
	}
	// 召唤
	private byte[] summonBO(ISession session,byte classCode,byte methodCode,IMessage in) throws AbstractLogicModelException{
		SummonBO summonBO = IServer.getModules().getModule(classCode,SummonBO.class);
		if(summonBO == null){
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
		switch (methodCode) {
		case 1: { // 召唤 [code = 3329]
	    	log.debug("Remark:{}","召唤 [code = 3329]");
		    org.game.protobuf.c2s.C2SSummonMsg.Summon msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SSummonMsg.Summon.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return summonBO.summon(session, msg);
		}
		case 2: { // 合成 [code = 3330]
	    	log.debug("Remark:{}","合成 [code = 3330]");
		    org.game.protobuf.c2s.C2SSummonMsg.ComposeSummon msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SSummonMsg.ComposeSummon.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return summonBO.composeSummon(session, msg);
		}
		case 3: { // 合成完成 [code = 3331]
	    	log.debug("Remark:{}","合成完成 [code = 3331]");
		    org.game.protobuf.c2s.C2SSummonMsg.ComposeFinish msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SSummonMsg.ComposeFinish.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return summonBO.composeFinish(session, msg);
		}
		case 4:  // 合成时间结束 [code = 3332]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		case 5: { // 获取合成信息 [code = 3333]
	    	log.debug("Remark:{}","获取合成信息 [code = 3333]");
			return summonBO.getComposeInfo(session);
		}
		case 6:  // 推送合成时间结束 [code = 3334]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		default:
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
	}
	// 好友
	private byte[] friendsBO(ISession session,byte classCode,byte methodCode,IMessage in) throws AbstractLogicModelException{
		FriendsBO friendsBO = IServer.getModules().getModule(classCode,FriendsBO.class);
		if(friendsBO == null){
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
		switch (methodCode) {
		case 1: { // 取得全部好友信息 [code = 3073]
	    	log.debug("Remark:{}","取得全部好友信息 [code = 3073]");
			return friendsBO.getFriends(session);
		}
		case 2: { // 操作 [code = 3074]
	    	log.debug("Remark:{}","操作 [code = 3074]");
		    org.game.protobuf.c2s.C2SFriendMsg.ReqOperate msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SFriendMsg.ReqOperate.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return friendsBO.operate(session, msg);
		}
		case 3: { // 取得推荐好友 [code = 3075]
	    	log.debug("Remark:{}","取得推荐好友 [code = 3075]");
			return friendsBO.getRecommendFriends(session);
		}
		case 4: { // 查询玩家 [code = 3076]
	    	log.debug("Remark:{}","查询玩家 [code = 3076]");
		    org.game.protobuf.c2s.C2SFriendMsg.ReqQueryPlayer msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SFriendMsg.ReqQueryPlayer.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return friendsBO.queryPlayerByID(session, msg);
		}
		default:
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
	}
	// 灵装
	private byte[] equipmentBO(ISession session,byte classCode,byte methodCode,IMessage in) throws AbstractLogicModelException{
		EquipmentBO equipmentBO = IServer.getModules().getModule(classCode,EquipmentBO.class);
		if(equipmentBO == null){
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
		switch (methodCode) {
		case 1: { // 装备 [code = 2817]
	    	log.debug("Remark:{}","装备 [code = 2817]");
		    org.game.protobuf.c2s.C2SEquipmentMsg.EquipMsg equipMsg = null;
		    try {
		    	equipMsg = org.game.protobuf.c2s.C2SEquipmentMsg.EquipMsg.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","equipMsg",equipMsg);		    	
			return equipmentBO.equip(session, equipMsg);
		}
		case 2: { // 卸下 [code = 2818]
	    	log.debug("Remark:{}","卸下 [code = 2818]");
		    org.game.protobuf.c2s.C2SEquipmentMsg.TakeOffEquipmentMsg takeOffEquipmentMsg = null;
		    try {
		    	takeOffEquipmentMsg = org.game.protobuf.c2s.C2SEquipmentMsg.TakeOffEquipmentMsg.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","takeOffEquipmentMsg",takeOffEquipmentMsg);		    	
			return equipmentBO.takeOff(session, takeOffEquipmentMsg);
		}
		case 3: { // 洗练 [code = 2819]
	    	log.debug("Remark:{}","洗练 [code = 2819]");
		    org.game.protobuf.c2s.C2SEquipmentMsg.ChangeSpecialAttrMsg changeSpecialAttrMsg = null;
		    try {
		    	changeSpecialAttrMsg = org.game.protobuf.c2s.C2SEquipmentMsg.ChangeSpecialAttrMsg.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","changeSpecialAttrMsg",changeSpecialAttrMsg);		    	
			return equipmentBO.changeSpecialAttr(session, changeSpecialAttrMsg);
		}
		case 4: { // 强化 [code = 2820]
	    	log.debug("Remark:{}","强化 [code = 2820]");
		    org.game.protobuf.c2s.C2SEquipmentMsg.UpgradeMsg upgradeMsg = null;
		    try {
		    	upgradeMsg = org.game.protobuf.c2s.C2SEquipmentMsg.UpgradeMsg.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","upgradeMsg",upgradeMsg);		    	
			return equipmentBO.upgrade(session, upgradeMsg);
		}
		case 5: { // 替换特殊属性 [code = 2821]
	    	log.debug("Remark:{}","替换特殊属性 [code = 2821]");
		    org.game.protobuf.c2s.C2SEquipmentMsg.ReplaceSpecialAttrMsg msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SEquipmentMsg.ReplaceSpecialAttrMsg.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return equipmentBO.replaceSpecialAttr(session, msg);
		}
		case 6:  // 推送装备 [code = 2822]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		default:
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
	}
	// 商店
	private byte[] storeBO(ISession session,byte classCode,byte methodCode,IMessage in) throws AbstractLogicModelException{
		StoreBO storeBO = IServer.getModules().getModule(classCode,StoreBO.class);
		if(storeBO == null){
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
		switch (methodCode) {
		case 1: { // 取得商店信息 [code = 2561]
	    	log.debug("Remark:{}","取得商店信息 [code = 2561]");
		    org.game.protobuf.c2s.C2SStoreMsg.GetStoreInfo storeInfo = null;
		    try {
		    	storeInfo = org.game.protobuf.c2s.C2SStoreMsg.GetStoreInfo.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","storeInfo",storeInfo);		    	
			return storeBO.getStoreInfo(session, storeInfo);
		}
		case 2: { // 购买 [code = 2562]
	    	log.debug("Remark:{}","购买 [code = 2562]");
		    org.game.protobuf.c2s.C2SStoreMsg.BuyGoods buyGoods = null;
		    try {
		    	buyGoods = org.game.protobuf.c2s.C2SStoreMsg.BuyGoods.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","buyGoods",buyGoods);		    	
			return storeBO.buy(session, buyGoods);
		}
		case 3: { // 刷新商店 [code = 2563]
	    	log.debug("Remark:{}","刷新商店 [code = 2563]");
		    org.game.protobuf.c2s.C2SStoreMsg.RefreshStore refreshStore = null;
		    try {
		    	refreshStore = org.game.protobuf.c2s.C2SStoreMsg.RefreshStore.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","refreshStore",refreshStore);		    	
			return storeBO.refreshStore(session, refreshStore);
		}
		case 4: { // 取得商品的购买记录 [code = 2564]
	    	log.debug("Remark:{}","取得商品的购买记录 [code = 2564]");
			return storeBO.getCommodityBuyLog(session);
		}
		case 5: { // 出售 [code = 2565]
	    	log.debug("Remark:{}","出售 [code = 2565]");
		    org.game.protobuf.c2s.C2SStoreMsg.SellInfo sellInfo = null;
		    try {
		    	sellInfo = org.game.protobuf.c2s.C2SStoreMsg.SellInfo.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","sellInfo",sellInfo);		    	
			return storeBO.sell(session, sellInfo);
		}
		case 6: { // 请求动态商品信息 [code = 2566]
	    	log.debug("Remark:{}","请求动态商品信息 [code = 2566]");
			return storeBO.reqDynamicCommodity(session);
		}
		default:
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
	}
	// 建筑
	private byte[] buildingBO(ISession session,byte classCode,byte methodCode,IMessage in) throws AbstractLogicModelException{
		BuildingBO buildingBO = IServer.getModules().getModule(classCode,BuildingBO.class);
		if(buildingBO == null){
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
		switch (methodCode) {
		case 1: { // 获取建筑信息 [code = 2049]
	    	log.debug("Remark:{}","获取建筑信息 [code = 2049]");
		    org.game.protobuf.c2s.C2SBuildingMsg.GetAllUnlockBuildingMsg msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SBuildingMsg.GetAllUnlockBuildingMsg.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return buildingBO.getBuildingInfo(session, msg);
		}
		case 2: { // 进入城市 [code = 2050]
	    	log.debug("Remark:{}","进入城市 [code = 2050]");
		    org.game.protobuf.c2s.C2SBuildingMsg.EnterCity enterCity = null;
		    try {
		    	enterCity = org.game.protobuf.c2s.C2SBuildingMsg.EnterCity.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","enterCity",enterCity);		    	
			return buildingBO.enterCity(session, enterCity);
		}
		case 3: { // 解锁建筑 [code = 2051]
	    	log.debug("Remark:{}","解锁建筑 [code = 2051]");
		    org.game.protobuf.c2s.C2SBuildingMsg.UnlockBuildingMsg unlockBuilding = null;
		    try {
		    	unlockBuilding = org.game.protobuf.c2s.C2SBuildingMsg.UnlockBuildingMsg.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","unlockBuilding",unlockBuilding);		    	
			return buildingBO.unlockBuilding(session, unlockBuilding);
		}
		case 4: { // 升级 [code = 2052]
	    	log.debug("Remark:{}","升级 [code = 2052]");
		    org.game.protobuf.c2s.C2SBuildingMsg.BuildingUpgradeMsg upgrade = null;
		    try {
		    	upgrade = org.game.protobuf.c2s.C2SBuildingMsg.BuildingUpgradeMsg.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","upgrade",upgrade);		    	
			return buildingBO.upgrade(session, upgrade);
		}
		case 5: { // 打工 [code = 2053]
	    	log.debug("Remark:{}","打工 [code = 2053]");
		    org.game.protobuf.c2s.C2SBuildingMsg.WorkMsg work = null;
		    try {
		    	work = org.game.protobuf.c2s.C2SBuildingMsg.WorkMsg.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","work",work);		    	
			return buildingBO.work(session, work);
		}
		case 6: { // 领薪水 [code = 2054]
	    	log.debug("Remark:{}","领薪水 [code = 2054]");
		    org.game.protobuf.c2s.C2SBuildingMsg.GetWorkRewardMsg getWorkReward = null;
		    try {
		    	getWorkReward = org.game.protobuf.c2s.C2SBuildingMsg.GetWorkRewardMsg.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","getWorkReward",getWorkReward);		    	
			return buildingBO.getWorkReward(session, getWorkReward);
		}
		case 10:  // 更新建筑 [code = 2058]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		case 11:  // 触发打工事件 [code = 2059]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		case 12: { // 升级完成反馈 [code = 2060]
	    	log.debug("Remark:{}","升级完成反馈 [code = 2060]");
		    org.game.protobuf.c2s.C2SBuildingMsg.ReqUpgradeFul req = null;
		    try {
		    	req = org.game.protobuf.c2s.C2SBuildingMsg.ReqUpgradeFul.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","req",req);		    	
			return buildingBO.upgradeFul(session, req);
		}
		case 14: { // 获取抓娃娃信息 [code = 2062]
	    	log.debug("Remark:{}","获取抓娃娃信息 [code = 2062]");
		    org.game.protobuf.c2s.C2SBuildingMsg.ReqGetGashaponInfo req = null;
		    try {
		    	req = org.game.protobuf.c2s.C2SBuildingMsg.ReqGetGashaponInfo.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","req",req);		    	
			return buildingBO.reqGetGashaponInfo(session, req);
		}
		case 15: { // 开始抓娃娃 [code = 2063]
	    	log.debug("Remark:{}","开始抓娃娃 [code = 2063]");
		    org.game.protobuf.c2s.C2SBuildingMsg.ReqStartGashapon req = null;
		    try {
		    	req = org.game.protobuf.c2s.C2SBuildingMsg.ReqStartGashapon.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","req",req);		    	
			return buildingBO.reqStartGashapon(session, req);
		}
		case 16: { // 请求抓娃娃结果验证 [code = 2064]
	    	log.debug("Remark:{}","请求抓娃娃结果验证 [code = 2064]");
		    org.game.protobuf.c2s.C2SBuildingMsg.ReqCheckGashaponResult req = null;
		    try {
		    	req = org.game.protobuf.c2s.C2SBuildingMsg.ReqCheckGashaponResult.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","req",req);		    	
			return buildingBO.reqCheckGashaponResult(session, req);
		}
		case 17: { // 请求刷新娃娃蛋池 [code = 2065]
	    	log.debug("Remark:{}","请求刷新娃娃蛋池 [code = 2065]");
		    org.game.protobuf.c2s.C2SBuildingMsg.ReqRefreshGashaponPool req = null;
		    try {
		    	req = org.game.protobuf.c2s.C2SBuildingMsg.ReqRefreshGashaponPool.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","req",req);		    	
			return buildingBO.reqRefreshGashaponPool(session, req);
		}
		default:
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
	}
	// 聊天
	private byte[] chatBO(ISession session,byte classCode,byte methodCode,IMessage in) throws AbstractLogicModelException{
		ChatBO chatBO = IServer.getModules().getModule(classCode,ChatBO.class);
		if(chatBO == null){
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
		switch (methodCode) {
		case 1: { // 发送聊天 [code = 2305]
	    	log.debug("Remark:{}","发送聊天 [code = 2305]");
		    org.game.protobuf.c2s.C2SChatMsg.ChatMsg msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SChatMsg.ChatMsg.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return chatBO.sendChatMsg(session, msg);
		}
		case 2:  // 推送聊天信息 [code = 2306]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		case 3: { // 更换房间 [code = 2307]
	    	log.debug("Remark:{}","更换房间 [code = 2307]");
		    org.game.protobuf.c2s.C2SChatMsg.ReqChangeRoom changeRoom = null;
		    try {
		    	changeRoom = org.game.protobuf.c2s.C2SChatMsg.ReqChangeRoom.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","changeRoom",changeRoom);		    	
			return chatBO.changeRoom(session, changeRoom);
		}
		case 7: { // 取得初始聊天信息(一般只是登陆时请求) [code = 2311]
	    	log.debug("Remark:{}","取得初始聊天信息(一般只是登陆时请求) [code = 2311]");
		    org.game.protobuf.c2s.C2SChatMsg.ReqInitChatInfo req = null;
		    try {
		    	req = org.game.protobuf.c2s.C2SChatMsg.ReqInitChatInfo.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","req",req);		    	
			return chatBO.getInitChatInfo(session, req);
		}
		default:
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
	}
	// 副本
	private byte[] dungeonBO(ISession session,byte classCode,byte methodCode,IMessage in) throws AbstractLogicModelException{
		DungeonBO dungeonBO = IServer.getModules().getModule(classCode,DungeonBO.class);
		if(dungeonBO == null){
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
		switch (methodCode) {
		case 1: { // 战斗开始 [code = 1793]
	    	log.debug("Remark:{}","战斗开始 [code = 1793]");
		    org.game.protobuf.c2s.C2SDungeonMsg.FightStartMsg msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SDungeonMsg.FightStartMsg.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return dungeonBO.fightStart(session, msg);
		}
		case 2: { // 战斗结束 [code = 1794]
	    	log.debug("Remark:{}","战斗结束 [code = 1794]");
		    org.game.protobuf.c2s.C2SDungeonMsg.FightOverMsg msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SDungeonMsg.FightOverMsg.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return dungeonBO.fightOver(session, msg);
		}
		case 3: { // 推进剧情 [code = 1795]
	    	log.debug("Remark:{}","推进剧情 [code = 1795]");
		    org.game.protobuf.c2s.C2SDungeonMsg.ProgressMsg msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SDungeonMsg.ProgressMsg.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return dungeonBO.promoteStory(session, msg);
		}
		case 4: { // 请求副本信息 [code = 1796]
	    	log.debug("Remark:{}","请求副本信息 [code = 1796]");
		    org.game.protobuf.c2s.C2SDungeonMsg.GetLevelInfo msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SDungeonMsg.GetLevelInfo.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return dungeonBO.getDungeonInfo(session, msg);
		}
		case 5:  // 推送章节组消息 [code = 1797]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		case 7:  // 更新活动副本 [code = 1799]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		case 8: { // 购买战斗次数 [code = 1800]
	    	log.debug("Remark:{}","购买战斗次数 [code = 1800]");
		    org.game.protobuf.s2c.S2CDungeonMsg.BuyFightCount msg = null;
		    try {
		    	msg = org.game.protobuf.s2c.S2CDungeonMsg.BuyFightCount.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return dungeonBO.buyFightCount(session, msg);
		}
		case 9:  // 刷新副本组次数 [code = 1801]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		case 10: { // 领取副本组奖励 [code = 1802]
	    	log.debug("Remark:{}","领取副本组奖励 [code = 1802]");
		    org.game.protobuf.c2s.C2SDungeonMsg.GetLevelGroupReward msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SDungeonMsg.GetLevelGroupReward.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return dungeonBO.getLevelGroupReward(session, msg);
		}
		case 11:  // 更新副本组 [code = 1803]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		case 12:  // 更新副本 [code = 1804]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		default:
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
	}
	// 约会
	private byte[] datingBO(ISession session,byte classCode,byte methodCode,IMessage in) throws AbstractLogicModelException{
		DatingBO datingBO = IServer.getModules().getModule(classCode,DatingBO.class);
		if(datingBO == null){
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
		switch (methodCode) {
		case 1: { // 获取剧本 [code = 1537]
	    	log.debug("Remark:{}","获取剧本 [code = 1537]");
		    org.game.protobuf.c2s.C2SDatingMsg.GetScriptMsg msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SDatingMsg.GetScriptMsg.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return datingBO.getScript(session, msg);
		}
		case 2: { // 约会对话 [code = 1538]
	    	log.debug("Remark:{}","约会对话 [code = 1538]");
		    org.game.protobuf.c2s.C2SDatingMsg.DialogueMsg msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SDatingMsg.DialogueMsg.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return datingBO.datingDialogue(session, msg);
		}
		case 3: { // 约会信息 [code = 1539]
	    	log.debug("Remark:{}","约会信息 [code = 1539]");
			return datingBO.getDatingInfo(session);
		}
		case 4:  // 推送结算信息 [code = 1540]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		case 5:  // 获取主线剧本 [code = 1541]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		case 6:  // 获取日常剧本 [code = 1542]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		case 7:  // 触发预定约会 [code = 1543]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		case 8: { // 回应约会邀请 [code = 1544]
	    	log.debug("Remark:{}","回应约会邀请 [code = 1544]");
		    org.game.protobuf.c2s.C2SDatingMsg.AnswerDatingInvitationMsg msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SDatingMsg.AnswerDatingInvitationMsg.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return datingBO.answerDatingInvitation(session, msg);
		}
		case 9:  // 更新城市约会 [code = 1545]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		case 11:  // 推送触发约会 [code = 1547]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		case 12:  // 更新预定约会列表 [code = 1548]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		case 13:  // 推送城市约会 [code = 1549]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		case 14:  // 更新触发约会 [code = 1550]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		case 15:  // 约会失败 [code = 1551]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		default:
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
	}
	// 精灵(版娘)
	private byte[] roleBO(ISession session,byte classCode,byte methodCode,IMessage in) throws AbstractLogicModelException{
		RoleBO roleBO = IServer.getModules().getModule(classCode,RoleBO.class);
		if(roleBO == null){
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
		switch (methodCode) {
		case 1: { // 取得全部精灵 [code = 1281]
	    	log.debug("Remark:{}","取得全部精灵 [code = 1281]");
			return roleBO.getRoles(session);
		}
		case 2: { // 赠送 [code = 1282]
	    	log.debug("Remark:{}","赠送 [code = 1282]");
		    org.game.protobuf.c2s.C2SRoleMsg.Donate msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SRoleMsg.Donate.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return roleBO.donate(session, msg);
		}
		case 3:  // 推送精灵信息 [code = 1283]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		case 4: { // 穿衣 [code = 1284]
	    	log.debug("Remark:{}","穿衣 [code = 1284]");
		    org.game.protobuf.c2s.C2SRoleMsg.Dress msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SRoleMsg.Dress.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return roleBO.dress(session, msg);
		}
		case 5: { // 切换精灵 [code = 1285]
	    	log.debug("Remark:{}","切换精灵 [code = 1285]");
		    org.game.protobuf.c2s.C2SRoleMsg.SwitchRole msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SRoleMsg.SwitchRole.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return roleBO.switchRole(session, msg);
		}
		case 6:  // 更新精灵心情值 [code = 1286]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		case 7: { // 触摸看板娘 [code = 1287]
	    	log.debug("Remark:{}","触摸看板娘 [code = 1287]");
		    org.game.protobuf.c2s.C2SRoleMsg.TouchRole msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SRoleMsg.TouchRole.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return roleBO.touchRole(session, msg);
		}
		case 8: { // 更换房间 [code = 1288]
	    	log.debug("Remark:{}","更换房间 [code = 1288]");
		    org.game.protobuf.c2s.C2SRoleMsg.ChangeRoom msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SRoleMsg.ChangeRoom.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return roleBO.changeRoom(session, msg);
		}
		case 9: { // 解锁房间 [code = 1289]
	    	log.debug("Remark:{}","解锁房间 [code = 1289]");
		    org.game.protobuf.c2s.C2SRoleMsg.UnlockRoom msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SRoleMsg.UnlockRoom.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return roleBO.unlockRoom(session, msg);
		}
		default:
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
	}
	// 英雄
	private byte[] heroBO(ISession session,byte classCode,byte methodCode,IMessage in) throws AbstractLogicModelException{
		HeroBO heroBO = IServer.getModules().getModule(classCode,HeroBO.class);
		if(heroBO == null){
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
		switch (methodCode) {
		case 1: { // 取得英雄信息 [code = 1025]
	    	log.debug("Remark:{}","取得英雄信息 [code = 1025]");
			return heroBO.getHeros(session);
		}
		case 2:  // 发送英雄 [code = 1026]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		case 3: { // 英雄升级 [code = 1027]
	    	log.debug("Remark:{}","英雄升级 [code = 1027]");
		    org.game.protobuf.c2s.C2SHeroMsg.HeroUpgrade heroUpgrade = null;
		    try {
		    	heroUpgrade = org.game.protobuf.c2s.C2SHeroMsg.HeroUpgrade.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","heroUpgrade",heroUpgrade);		    	
			return heroBO.heroUpgrade(session, heroUpgrade);
		}
		case 4: { // 英雄突破 [code = 1028]
	    	log.debug("Remark:{}","英雄突破 [code = 1028]");
		    org.game.protobuf.c2s.C2SHeroMsg.HeroAdvance heroAdvance = null;
		    try {
		    	heroAdvance = org.game.protobuf.c2s.C2SHeroMsg.HeroAdvance.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","heroAdvance",heroAdvance);		    	
			return heroBO.heroAdvance(session, heroAdvance);
		}
		case 5:  // 英雄经验信息 [code = 1029]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		case 6:  // 发送一个到多个英雄 [code = 1030]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		case 7: { // 合成英雄 [code = 1031]
	    	log.debug("Remark:{}","合成英雄 [code = 1031]");
		    org.game.protobuf.c2s.C2SHeroMsg.HeroCompose heroCompose = null;
		    try {
		    	heroCompose = org.game.protobuf.c2s.C2SHeroMsg.HeroCompose.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","heroCompose",heroCompose);		    	
			return heroBO.heroCompose(session, heroCompose);
		}
		case 8: { // 天使觉醒 [code = 1032]
	    	log.debug("Remark:{}","天使觉醒 [code = 1032]");
		    org.game.protobuf.c2s.C2SHeroMsg.ReqAngelWake msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SHeroMsg.ReqAngelWake.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return heroBO.angelWake(session, msg);
		}
		case 9: { // 天使加点 [code = 1033]
	    	log.debug("Remark:{}","天使加点 [code = 1033]");
		    org.game.protobuf.c2s.C2SHeroMsg.ReqAngelAddBit msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SHeroMsg.ReqAngelAddBit.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return heroBO.angelAddBit(session, msg);
		}
		case 10: { // 天使重置 [code = 1034]
	    	log.debug("Remark:{}","天使重置 [code = 1034]");
		    org.game.protobuf.c2s.C2SHeroMsg.ReqAngelReset msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SHeroMsg.ReqAngelReset.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return heroBO.angelReset(session, msg);
		}
		case 11: { // 英雄进阶 [code = 1035]
	    	log.debug("Remark:{}","英雄进阶 [code = 1035]");
		    org.game.protobuf.c2s.C2SHeroMsg.ReqUpQuality msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SHeroMsg.ReqUpQuality.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return heroBO.upQuality(session, msg);
		}
		case 12: { // 更换英雄皮肤 [code = 1036]
	    	log.debug("Remark:{}","更换英雄皮肤 [code = 1036]");
		    org.game.protobuf.c2s.C2SHeroMsg.ReqChangeHeroSkin msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SHeroMsg.ReqChangeHeroSkin.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return heroBO.changeHeroSkin(session, msg);
		}
		default:
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
	}
	// 邮件
	private byte[] mailBO(ISession session,byte classCode,byte methodCode,IMessage in) throws AbstractLogicModelException{
		MailBO mailBO = IServer.getModules().getModule(classCode,MailBO.class);
		if(mailBO == null){
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
		switch (methodCode) {
		case 1: { // 邮件操作 [code = 769]
	    	log.debug("Remark:{}","邮件操作 [code = 769]");
		    org.game.protobuf.c2s.C2SMailMsg.MailHandleMsg mailMsg = null;
		    try {
		    	mailMsg = org.game.protobuf.c2s.C2SMailMsg.MailHandleMsg.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","mailMsg",mailMsg);		    	
			return mailBO.operation(session, mailMsg);
		}
		case 2:  // 邮件改变 [code = 770]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		case 3:  // 发送全部邮件 [code = 771]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		case 4: { // 取得全部邮件 [code = 772]
	    	log.debug("Remark:{}","取得全部邮件 [code = 772]");
			return mailBO.getMails(session);
		}
		default:
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
	}
	// 道具
	private byte[] itemBO(ISession session,byte classCode,byte methodCode,IMessage in) throws AbstractLogicModelException{
		ItemBO itemBO = IServer.getModules().getModule(classCode,ItemBO.class);
		if(itemBO == null){
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
		switch (methodCode) {
		case 2: { // 使用道具 [code = 514]
	    	log.debug("Remark:{}","使用道具 [code = 514]");
		    org.game.protobuf.c2s.C2SItemMsg.UseItem param = null;
		    try {
		    	param = org.game.protobuf.c2s.C2SItemMsg.UseItem.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","param",param);		    	
			return itemBO.useGoods(session, param);
		}
		case 3: { // 下发物品列表信息 [code = 515]
	    	log.debug("Remark:{}","下发物品列表信息 [code = 515]");
			return itemBO.getItems(session);
		}
		default:
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
	}
	// 核心
	private byte[] core(ISession session,byte classCode,byte methodCode,IMessage in) throws AbstractLogicModelException{
		Core core = IServer.getModules().getModule(classCode,Core.class);
		if(core == null){
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
		switch (methodCode) {
		case 1: { // 进入游戏 [code = 257]
	    	log.debug("Remark:{}","进入游戏 [code = 257]");
		    org.game.protobuf.c2s.C2SLoginMsg.EnterGame enterGame = null;
		    try {
		    	enterGame = org.game.protobuf.c2s.C2SLoginMsg.EnterGame.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","enterGame",enterGame);		    	
			return core.enterGame(session, enterGame);
		}
		case 2:  // 退出游戏 [code = 258]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		case 3: { // 修改语言 [code = 259]
	    	log.debug("Remark:{}","修改语言 [code = 259]");
			return core.updateLanguage(session);
		}
		case 4: { // 修改信息 [code = 260]
	    	log.debug("Remark:{}","修改信息 [code = 260]");
		    org.game.protobuf.c2s.C2SPlayerMsg.SetPlayerInfo param = null;
		    try {
		    	param = org.game.protobuf.c2s.C2SPlayerMsg.SetPlayerInfo.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","param",param);		    	
			return core.setPlayerInfo(session, param);
		}
		case 5: { // 断线重连 [code = 261]
	    	log.debug("Remark:{}","断线重连 [code = 261]");
		    org.game.protobuf.c2s.C2SLoginMsg.ReqReconnect param = null;
		    try {
		    	param = org.game.protobuf.c2s.C2SLoginMsg.ReqReconnect.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","param",param);		    	
			return core.reconnect(session, param);
		}
		case 6: { // 心跳 [code = 262]
	    	log.debug("Remark:{}","心跳 [code = 262]");
			return core.heartbeat(session);
		}
		case 7:  // 推送公告 [code = 263]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		case 8: { // 阵型操作 [code = 264]
	    	log.debug("Remark:{}","阵型操作 [code = 264]");
		    org.game.protobuf.c2s.C2SPlayerMsg.OperateFormation msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SPlayerMsg.OperateFormation.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return core.operate(session, msg);
		}
		case 9: { // 取得全部阵型 [code = 265]
	    	log.debug("Remark:{}","取得全部阵型 [code = 265]");
			return core.getFormations(session);
		}
		case 11: { // 取得玩家信息 [code = 267]
	    	log.debug("Remark:{}","取得玩家信息 [code = 267]");
			return core.getPlayerInfo(session);
		}
		case 12: { // 获取服务器时间 [code = 268]
	    	log.debug("Remark:{}","获取服务器时间 [code = 268]");
		    org.game.protobuf.c2s.C2SLoginMsg.ReqServerTime reqServerTime = null;
		    try {
		    	reqServerTime = org.game.protobuf.c2s.C2SLoginMsg.ReqServerTime.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","reqServerTime",reqServerTime);		    	
			return core.getServerTime(session, reqServerTime);
		}
		case 13: { // 修改助战单位 [code = 269]
	    	log.debug("Remark:{}","修改助战单位 [code = 269]");
		    org.game.protobuf.c2s.C2SPlayerMsg.ChangeHelpFightHero param = null;
		    try {
		    	param = org.game.protobuf.c2s.C2SPlayerMsg.ChangeHelpFightHero.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","param",param);		    	
			return core.changeHelpFightHero(session, param);
		}
		case 14: { // 礼包码 [code = 270]
	    	log.debug("Remark:{}","礼包码 [code = 270]");
		    org.game.protobuf.c2s.C2SLoginMsg.GiftCode param = null;
		    try {
		    	param = org.game.protobuf.c2s.C2SLoginMsg.GiftCode.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","param",param);		    	
			return core.giftCode(session, param);
		}
		case 15: { // 取得目标玩家信息 [code = 271]
	    	log.debug("Remark:{}","取得目标玩家信息 [code = 271]");
		    org.game.protobuf.c2s.C2SPlayerMsg.ReqTargetPlayerInfo param = null;
		    try {
		    	param = org.game.protobuf.c2s.C2SPlayerMsg.ReqTargetPlayerInfo.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","param",param);		    	
			return core.reqTargetPlayerInfo(session, param);
		}
		case 16: { // 切换阵型 [code = 272]
	    	log.debug("Remark:{}","切换阵型 [code = 272]");
		    org.game.protobuf.c2s.C2SPlayerMsg.ReqSwitchFormation param = null;
		    try {
		    	param = org.game.protobuf.c2s.C2SPlayerMsg.ReqSwitchFormation.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","param",param);		    	
			return core.switchFormation(session, param);
		}
		case 17: { // 取得助战玩家 [code = 273]
	    	log.debug("Remark:{}","取得助战玩家 [code = 273]");
			return core.getHelpFightPlayer(session);
		}
		case 18: { // 测试消息 [code = 274]
	    	log.debug("Remark:{}","测试消息 [code = 274]");
		    org.game.protobuf.c2s.C2SLoginMsg.ReqTestMsg msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SLoginMsg.ReqTestMsg.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return core.reqTest(session, msg);
		}
		case 19: { // 购买资源 [code = 275]
	    	log.debug("Remark:{}","购买资源 [code = 275]");
		    org.game.protobuf.c2s.C2SPlayerMsg.ReqBuyResources msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SPlayerMsg.ReqBuyResources.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return core.buyResources(session, msg);
		}
		case 20: { // 资源购买记录 [code = 276]
	    	log.debug("Remark:{}","资源购买记录 [code = 276]");
		    org.game.protobuf.c2s.C2SPlayerMsg.ReqBuyResourcesLog msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SPlayerMsg.ReqBuyResourcesLog.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return core.buyResourcesLog(session, msg);
		}
		case 21:  // 玩家属性更新 [code = 277]
			throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
		case 22: { // 上传前台离散数据 [code = 278]
	    	log.debug("Remark:{}","上传前台离散数据 [code = 278]");
		    org.game.protobuf.c2s.C2SPlayerMsg.ReqNewPlayerGuide msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SPlayerMsg.ReqNewPlayerGuide.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return core.reqNewPlayerGuide(session, msg);
		}
		case 23: { // 记录前台异常 [code = 279]
	    	log.debug("Remark:{}","记录前台异常 [code = 279]");
		    org.game.protobuf.c2s.C2SPlayerMsg.RecordClientErr msg = null;
		    try {
		    	msg = org.game.protobuf.c2s.C2SPlayerMsg.RecordClientErr.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","msg",msg);		    	
			return core.recordClientErr(session, msg);
		}
		case 24: { // 取得功能开关 [code = 280]
	    	log.debug("Remark:{}","取得功能开关 [code = 280]");
			return core.getFunctionSwitch(session);
		}
		case 25: { // 上传系统设置 [code = 281]
	    	log.debug("Remark:{}","上传系统设置 [code = 281]");
		    org.game.protobuf.c2s.C2SPlayerMsg.Settings settings = null;
		    try {
		    	settings = org.game.protobuf.c2s.C2SPlayerMsg.Settings.parseFrom(in.getBody());
		    } catch (Exception e) {
		    	log.error(e);
		    	throw ToolError.newLogicError(ArtifactErrorCode.PARAM_ERROR);
			}
			log.debug("{}:{}","settings",settings);		    	
			return core.uploadSettings(session, settings);
		}
		default:
			throw ToolError.newLogicError(ArtifactErrorCode.NOT_FOND_MODULE);
		}
	}
}